package com.zr.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zr.dao.BaseDao;
import com.zr.model.Point;
import com.zr.service.DeletePointService;
@Service("deletepoints")
public class DeletePointServiceImpl implements DeletePointService{
	@Resource
	private BaseDao baseDao;
	
	@Override
	public void deletepoints(int[] pids) {
		for (int j = 0; j < pids.length; j++) {
			System.out.println(baseDao);
			System.out.println(pids[j]);
			Point p = (Point) baseDao.get(Point.class, Integer.valueOf(pids[j]));
			System.out.println(p);
			baseDao.delete(p);	
		}
		}
}
